package com.dstz.demo.rest.controller;

import com.dstz.base.api.response.impl.ResultMsg;
import com.dstz.base.rest.BaseController;
import com.dstz.demo.core.manager.StationinfoManager;
import com.dstz.demo.core.model.Stationinfo;
import com.dstz.demo.core.model.StationlineinfoStationinfoDoubleVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;


/**
 * 所有站点信息 控制器类<br/>
 * @author  aschs
 * </pre>
 */
@RestController
@RequestMapping("/sys/stationinfo")
public class StationinfoController extends BaseController<Stationinfo>{
	@Resource
	private StationinfoManager stationinfoManager;
	
	
	@Override
	protected String getModelDesc() {
		return "所有站点信息";
	}

	@GetMapping("/getSites")
	public ResultMsg<List<StationlineinfoStationinfoDoubleVO>> getSites(BigDecimal lng, BigDecimal lat){


		List<StationlineinfoStationinfoDoubleVO> data=stationinfoManager.getSites(lng,lat);


		return  new ResultMsg<List<StationlineinfoStationinfoDoubleVO>>(data);
	}



}
